package com.example.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.entity.Askers;
import com.example.entity.AskersVo;
import com.example.entity.User;
import com.example.mapper.AskersMapper;
import com.example.service.AskersService;

@Service
public class AskersServiceImpl implements AskersService{
	
	@Autowired
	private AskersMapper askersMapper;

	
	@Override
	public List<Askers> selectCheckedId() {
		// TODO Auto-generated method stub
		return askersMapper.selectCheckedId();
	}
	
	/**
	 * 多条件查询
	 * @param userVO
	 * @return
	 */
	@Override
	public List<Askers> GetUsersLayUI(AskersVo askersVo) {
		return askersMapper.GetUsersLayUI(askersVo);
	}

	/**
	 * 分页查询
	 * @param userVO
	 * @return
	 */
	@Override
	public int getCount(AskersVo askersVo) {
		return askersMapper.getCount(askersVo);
	}

	 /**
     * 查询全部
     * @return
     */
	@Override
	public List<Askers> selectListAll() {
		return askersMapper.selectListAll();
	}

	/**
	 * 修改权重
	 */
	@Override
	public int upAskers(Askers weight) {
		// TODO Auto-generated method stub
		return askersMapper.upAskers(weight);
	}

	/**
	 * user表插入asker表判断是否存在
	 */
	@Override
	public Askers selectIdAndName(String askerId, String askerName) {
		// TODO Auto-generated method stub
		return askersMapper.selectIdAndName(askerId, askerName);
	}

	/**
	 * 添加咨询师(同步咨询师信息)
	 */
	
	@Override
	public int addTBConsultant(User ue) {
		// TODO Auto-generated method stub
		return askersMapper.addTBConsultant(ue);
	}
	/**
	 * 删除咨询师(同步咨询师信息)
	 */
	@Override
	public int delTBConsultant(String id) {
		// TODO Auto-generated method stub
		return askersMapper.delTBConsultant(id);
	}

}
